/**
 * 学员基本信息卡片弹窗
 * @param personId  学员id
 */
function personInfo(personId, studentName, sscCheck, remindId, tab) {
    if (personId == null || personId == '') {
        layer.msg("参数错误");
        return;
    }
    var tabUrl = '';
    // 默认打开动态tab
    var parm = '';
    if (tab != null && tab != '') {
        parm += '&tab=' + tab
    } else {
        parm += '&tab=' + 1
    }
    if (sscCheck != null && sscCheck != '') {
        parm += '&sscCheck=' + sscCheck
    }
    if (remindId != null && remindId != "" && remindId > 0) {
        parm += '&remindId=' + remindId
    }
    tabUrl = '/student/info?personId=' + personId + parm;

    // 打开弹窗
    layer.open({
        type: 2,
        /*title: "",*/
        closeBtn: 1, //显示关闭按钮
        shade: 0,
        area: ['98%', '99%'],
        // offset: 'rb', //右下角弹出
        // time: 2000, //2秒后自动关闭
        maxmin: true, //开启最大化最小化按钮
        anim: 2,
        scrollbar: false, //是否允许浏览器出现滚动条
        content: [tabUrl, 'no'], //iframe的url，no代表不显示滚动条
        success: function (layero, index) {
            if (studentName != 'undefined') {
                layer.title(studentName + " 的信息卡", index);
            }
        },
        end: function () {
            //关闭弹出框之后自动刷新父页面（未正常上课面板 ）
            //debugger
            if (tab === 9) {
                // 关闭修改常用老师
                reloadLeaveTeacherStu();
            } else {
                // 默认
                switch (sscCheck) {
                    case "s1":
                        reloadAbnormalunFinishLessons(); //ssc未正常上课面板
                        break;
                    case "c1":
                        reloadAbnormalunFinishLessons(); //ssc未正常上课面板
                        break;
                    case 2:
                        reloadInactiveLessons(); //ssc inactive面板
                        break;
                    case 3:
                        trackRemindBySsc(); //ssc 提醒面板
                        break;
                    case 4:
                        stuOrderBySsc(); //ssc 订单到期面板
                        break;
                    case 5:
                        selectMaterialFinishedBySSC();//教材将学完
                        break;
                    case 6:
                        selectOcNewStudent(); //新学员跟进面板
                        break;
                    case 7:
                        oldStuFollowBySsc(); //ssc 老学员班跟进醒面板
                        break;
                    case 8:
                        teacherRankReload(); //ssc 老师投诉学员面板
                        break;
                    case 9:
                        stuEvaluationReload(); //ssc 学员投诉面板
                        break;
                    case 10:
                        trackRemindBycc(); //ccc 提醒面板
                        break;
                    case 11:
                        stuOrderInfo(); //cc 订单到期面板
                        break;
                    case 12:
                        demoMissedList(); //cc已约未上面板
                        break;
                    case 13:
                        potentialStu(); //cc 潜在学员面板
                        break;
                    case 14:
                        appointedStu(); //cc 待约学员面板
                        break;
                    case 15:
                        mainTipRelLeads(); //cc refList 面板
                        break;
                    case 16:
                        newStudent(); //cc 新学员面板
                        break;
                    case 17:
                        ocQuestionReload(); //cc oc问卷蒂阿查面板
                        break;
                    case 18:
                        trackRemindByBcc(); //bcc 提醒面板
                        break;
                    case 19:
                        mainTipByBcc(); //bcc 潜在客户面板
                        break;
                    case 20:
                        demoMissedReload();//bcc demo已约未上成面板
                        break;
                    case 21:
                        unfinishDemoReload(); //bcc demo未完成面板
                        break;
                    case 22:
                        demoFinishedReload(); //bcc demo已完成面板
                        break;
                    case 23:
                        renewOrdersReload(); //bcc demo已完成面板
                        break;
                    case 24:
                        reloadDiamondFollow();//ssc 钻石学员跟进
                        break;
                    case 26:
                        reloadNotBookedChineseCourseTable();//待约中教课跟进
                        break;
                    case 27:
                        reloadLtNotFeedbackTable();//待提交阶段检测报告
                        break;
                    case 29:
                        reloadClassWeekInfo();//周课程少于3节
                        break;
                    default:
                }
            }
        }
    });
}

//查看学员成绩变化
function viewScore(personId,loginName) {
    /*let url = "https://da.etalk365.com/ss_score_collection?person_id=" + personId;*/
    let url="/student/grades/chart/"+personId
    layer.open({
        type: 2 //Page层类型
        , area: ['80%', '95%']
        , title: ''
        , shade: 0.6 //遮罩透明度
        , maxmin: false //允许全屏最小化
        , anim: 1 //0-6的动画形式，-1不开启
        ,btnAlign: 'c'
        , content: url
        ,btn: ['录入成绩']
        ,yes:function(index){
            addAchievementStudent(index,url,loginName);
            return false;
        }
    });
}
